var QcloudSms = require("qcloudsms_js");
var appid = '1400109336'
var appkey = '972e64e3afe0df33c06fbd7386379960'
var qcloudsmscase = QcloudSms(appid, appkey);
var templateID = 152746

module.exports.sendVerification =  function sendVerification(code,phone,callback){
		var ssender = qcloudsmscase.SmsSingleSender();
		var params = [code]
		console.log(code,phone,'dsdsds')
		ssender.sendWithParam( 86, phone, templateID,
			  [String(code)],'',"", "", function(err,res,resData){
			  	callback(err,res,resData)

			})
	}


	module.exports.sendCoupon =  function sendCoupon(code,phone,callback){
		var ssender = qcloudsmscase.SmsSingleSender();
		var params = [code]
		ssender.sendWithParam( 86, phone, 160347,
			  [String(code)],'',"", "", function(err,res,resData){
			  	callback(err,res,resData)

			})
	}